package me.send.business.service.service;

import java.util.HashMap;
import java.util.Map;

import me.send.business.base.SendVariable;
import me.send.business.service.BaseService;
import me.send.business.service.mapper.SysconfigMapper;
import me.send.business.service.pojo.Sysconfig;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysconfigService extends BaseService{

	@Autowired
	private SysconfigMapper sysconfigMapper;
	
	public Map<String, Object> object_keye(String devicenumber,String keye){
		// 设置一个返回对象 2015年6月1日18:18:38
		Map<String, Object> map = new HashMap<String, Object>();
		// 将最后要返回的结果返回给他 2015年6月1日18:18:59
		map.put(SendVariable.COMM_ERROR, error_1001());
		map.put(SendVariable.COMMON_OBJECT, new Sysconfig());
		if (isDevicenumber(devicenumber)) {
			if (keye!=null && !keye.equals("")) {
				Sysconfig sysconfig = sysconfigMapper.object_keye(keye);
				map.put(SendVariable.COMM_ERROR, error_1000());
				map.put(SendVariable.COMMON_OBJECT, sysconfig);
			}else {
				map.put(SendVariable.COMM_ERROR, error_1006());
//				map.put(Hsvariable.COMMON_OBJECT, sysconfig);
			}
		}else{
			map.put(SendVariable.COMM_ERROR, error_1002());
//			map.put(Hsvariable.COMMON_OBJECT, sysconfig);
		}
		return map;
	}
	
}
